package com.cn.wanxi.service;

import com.cn.wanxi.model.CuisineModel;

import java.util.ArrayList;
import java.util.List;

public class CuisineService {
    /**
     * 得到菜系的集合
     *
     * @return
     */
    public List<CuisineModel> getList() {
        List<CuisineModel> list = new ArrayList<>();
        CuisineModel cuisineModel = new CuisineModel();
        String[] titles = cuisineModel.getTitles();
        for (int i = 0; i < titles.length; i++) {
            CuisineModel model = new CuisineModel();
            model.setTitle(titles[i]);
            list.add(model);
        }
        return list;
    }
}
